# $Id: PKGBUILD 150384 2012-02-17 10:44:15Z allan $
# Maintainer: 
# Contributor: Jan de Groot <jgc@archlinux.org>

pkgname=xorg-fonts-75dpi
pkgver=1.0.1
pkgrel=4
pkgdesc="X.org 75dpi fonts"
arch=(any)
url="http://xorg.freedesktop.org/"
license=('custom')
depends=(xorg-fonts-encodings xorg-fonts-alias xorg-font-utils fontconfig)
groups=('xorg')
install=xfonts.install
source=(${url}/releases/individual/font/font-adobe-75dpi-1.0.1.tar.bz2
        ${url}/releases/individual/font/font-adobe-utopia-75dpi-1.0.2.tar.bz2
        ${url}/releases/individual/font/font-bh-75dpi-1.0.1.tar.bz2
        ${url}/releases/individual/font/font-bh-lucidatypewriter-75dpi-1.0.1.tar.bz2
        ${url}/releases/individual/font/font-bitstream-75dpi-1.0.1.tar.bz2)
md5sums=('a47681c97bd012196691c95e34d400f1'
         '71dffebeeb702d10876555c361fb69cf'
         '53785d2688392aec5cba79fc0ddb23a2'
         '6397062f2b346ce5bbe5472f3353a9a9'
         'aed54fb53d2d24aff10c92985286d1e5')

build() {
  cd "${srcdir}"
  for dir in *; do
    if [ -d "${dir}" ]; then
      pushd "${dir}"
      ./configure --prefix=/usr \
          --with-fontdir=/usr/share/fonts/75dpi
      make
      popd
    fi
  done
}

package() {
  cd "${srcdir}"
  install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
  for dir in *; do
    if [ -d "${dir}" ]; then
      pushd "${dir}"
      make DESTDIR="${pkgdir}" install
      install -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.${dir%-75dpi-*}"
      popd
    fi
  done
  rm -f "${pkgdir}"/usr/share/fonts/75dpi/fonts.*
}